<?php
include_once 'header.php';
$user_info = $pdo->query("select * from yunbbs_users where name='$name'");
foreach ($user_info as $key1 => $value1) {
    
}
?>
<style>
    #body {
        /*height: 260px;*/
        width: 100%;
        background-color: #d3d3d3;
        display: flex;
        justify-content: space-around;
    }
    #body_left {
        width: 66%;
        height: 100%;
        /*background-color: white;*/
    }
    #body_right {
        width: 26%;
        height: 100%;
        /*background-color: greenyellow;*/
    }
    .title {
        height: 40px;
        background-color: #efeded;
        line-height: 30px;
    }
    .message {
        margin-left: 10px;
        margin-bottom: 10px;
        width: 70px;
        border: 1px solid #bbb7bb;
        float: left;
    }
    .message3 {
        margin-left: 10px;
        margin-top: 10px;
        width: 70px;
        border: 1px solid #bbb7bb;
    }
</style>
<div id="body_left">
    <div id="body_left_title">
        <div style="margin-left:15px; background-color: white; height: 200px;">
            <p class="title">&nbsp mybbs >> 设置</p>
            <form method="post" action="doaction.php?action=set_personal_info&name=<?php echo $name ?>">
                <table style="margin-left:30px;height: 120px">
                    <tr>
                        <td rowspan="5"><img src="<?php echo $value1['avatar']; ?>" style="height:80px;width: 80px;"></td>
                    </tr>
                    <tr>
                        <td>会员:<?php echo $name; ?>(第<?php echo $value1['id']; ?>号会员,<?php echo wordTime($value1['regtime']); ?>前加入) ·(99)<a href="#" style="color:blue;">编辑</a></td>
                    </tr>
                    <tr>
                        <td>主贴: 0 回帖: 0</td>
                    </tr>
                    <tr>
                        <td>网站:<?php echo $value1['url']; ?></td>
                    </tr>
                    <tr>
                        <td>关于:</td>   
                    </tr>
                </table>
            </form>
        </div>
    </div>
</div>
<div id="body_right">
    <div id="fenlei">
        <div style="margin-top:10px; background-color: white; height: 120px;">
            <p class="title">&nbsp管理员面板 (MyBBS官方支持)</p>
            <div class="message"><a href="fenleiguanli.php">分类管理</a></div>
            <div class="message"><a href="fenleiguanli.php">网站设置</a></div>
            <div class="message"><a href="fenleiguanli.php">用户管理</a></div>
            <div class="message"><a href="fenleiguanli.php">链接管理</a></div>
        </div>
        <div style="margin-top:10px; background-color: white; height: 120px; display: flex; flex-direction:  column;">
            <div class="title">&nbsp最近添加的分类</div>
            <div style="display: flex; flex-wrap: wrap;">
                <?php foreach ($yunbbs_categories as $key => $value) { ?>
                    <div class="message3"><a href="#"><?php echo $value['name'] ?></a></div>
                <?php }
                ?>
            </div>
        </div>
    </div>
    <div style="height: 20px;"></div>
</div>

<?php
include_once 'footer.php';
?>

